﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Frogism.Core;
using Frogism.Data;

namespace Frogism.Tests {
  [TestFixture]
  public class LoaderBaseTest {
    [Test]
    [ExpectedException("Frogism.Data.FrogismConfigurationException", ExpectedMessage = "Frogism ConnectionString not found in application settings file with name \"BlahBlah\".")]
    public void TestInvalidConnectionString() {
      TestLoader loader = new TestLoader();
      loader.TestGetConnectionString();
    }

  }
  public class TestStringObject : ObjectIdBase, Frogism.Tests.ITestStringObject {
    public string ThisString { get; set; }
  }
  public class TestLoader : LoaderBase<TestStringObject,ITestStringObject> {
    public string TestGetConnectionString() {
      return this.ConnectionString;
    }
    protected override string ConnectionStringName(){
      return "BlahBlah";
    }


    protected override string ProcNameGetAll {
      get { throw new NotImplementedException(); }
    }

    protected override string ProcNameGetById {
      get { throw new NotImplementedException(); }
    }

    protected override ITestStringObject GetEmptyObject() {
      throw new NotImplementedException();
    }

    protected override void FillObject(ITestStringObject i, FriendlyReader reader) {
      throw new NotImplementedException();
    }
  }
}
